<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>
<body>
    <div id='app'>
        {{msg}}
        <hr>
        <father :aa='msg' :bb='msg2'></father>

        <hr>
        <father2 :f2='fa2'></father2>
    </div>
    <script type='text/javascript'>
        var  father={
            template:`<div>我是father组件==={{aa}}==={{bb}}</div>`,
            props:['aa','bb']
        }

        Vue.component('father',father)

        /* 私有 */
        var  father2={
            template:`<div>我是father2组件==={{f2}}</div>`,
            props:['f2']
        }

        var vm = new Vue({
            el: '#app',
            data: {
                msg: '我是app组件中的第一个值',
                msg2:'我是第二个值',
                fa2:'我是app传给father2的值'
            },
            components:{
                father2
            }
        });
    </script>
</body>
</html>